As it is well known, an analysis of a power consumption on an electronic device may be indicative of the operations executed by the electronic device. In particular, detecting devices and methods for detecting the power consumption of the electronic device provide monitoring a power signal consumed by such electronic device, hereinafter indicated as a power signal.
Values of the power signal are sampled at sampling time intervals and stored in a memory of the detecting apparatus in order to detect a correlation between sampled values and/or a correlation between sequences of such sampled values. In fact, a sequence of sampled values, also referred to as a signal pattern, repeated in a substantially same manner at different time intervals, may be indicative of a same operation performed in the corresponding time intervals.
More particularly, the detecting apparatus and methods mentioned above execute analysis on a plurality of signal patterns, stored in connection to corresponding time intervals, in order to identify correlations between two or more different signal patterns and to retrieve information about the corresponding operations, executed by the electronic device. For example, the detecting apparatus and methods for detecting power consumption may be used for establishing the security of an IC Card secure algorithm, i.e. a cryptographic algorithm. In this case, the analysis of the signal patterns is used to scan a vulnerability of the cryptographic algorithm: the higher the correlations between signal patterns are, the higher the possibility to retrieve secure data, for example, a cryptographic key stored inside the IC Card. In other words, since the detection of repetition of signal patterns could be used to get information about the implementation of a cryptographic algorithm, or to try to extract or identify data in the IC Card, the detecting apparatus and methods generally must be used to test the vulnerability of the IC Card and to ensure its security, before its releasing.
A known method to detect repetitive patterns is based on a computation of a correlation function between sampled values of power signals: the correlation substantially results in a number indicative of a degree of relationship between such sampled values, and, consequently, a relationship between the operations performed by the electronic device. More particularly, a correlation matrix is used to store correlations between sampled values, for example, deriving by the sampling of a power signal S through a low pass filter, having a bandwidth determined empirically.
With reference to FIG. 1 a diagram 10 schematically shows sampled values of a power at corresponding sampling time intervals. A window Bs is defined to detect correlations between sampled values in a corresponding time interval T0-T2, and a step (Step) is defined for advancing the window Bs, in order to detect correlations between sampled values in an advanced time interval T1-T3. The length of the step Step is less than the length of the window Bs so that when the window Bs is advanced, the correlation function may include some sampled values belonging to the corresponding time intervals TO-T1, whereon the window Bs was previously set.
A sequence of sampled values Si, including a plurality of sampled values may for example be processed according to the formula:si=S(t) ∀tε[i·Bs,(i+1)·Bs]
The correlation matrix, hereafter C, may be calculated asC(i,j)=|r(si,sj)|,where r is the correlation coefficient between the sequences Si and Sj, indicative of the degree of similarity between such sequences of sampled values.
The detecting apparatus and method may process the correlation matrix C for a plurality of sample values and display a result of the computation on a two dimensional image, for example, on a monitor connected to the detecting device, representing the repetition of signal patterns.
As it is apparent from FIG. 2, the image representing the correlation matrix C, even if it is one of the best graphical results achievable through a known detecting apparatus and method, does not provide a clear representation of the correlation matrix. More particularly, the correlation matrix C in FIG. 2 includes a sub-matrix, wherein high correlation between signal patterns is represented with a substantially grey square. As it is apparent, in the matrix of FIG. 2, the grey square representing a correlation of two signal patterns is not clear, even when such patterns are strictly correlated, so it is really difficult to analyze the graphical representation of the correlation matrix C to determine different degrees of correlations.
According to the known method for detecting correlations, the graphical appearance of the correlation matrix C substantially depends on the length of the window Bs and on the step Step used to process correlation matrix C. In order to obtain a good graphical representation of the correlation matrix C, several empirical executions should be processed. Moreover, even for a length of the window Bs and for a step Step conveniently set, the graphical resolution may depend by the number of greys used to plot it.
Another known drawback is that in a correlation matrix calculated with a short step Step, in order to determine correlations with high precision, a very large size matrix and a lot of memory for storing the correlations are generally required. Moreover long post-processing time may be required if further elaboration is needed.
The technical problem is that of providing a method for detecting possible correlations between signal patterns corresponding to the power consumption of an electronic device, able to reduce the time and steps needed to process a correlation matrix, reduce memory size consumption, and at the same time determine, with high precision, the correlations, providing a deeper and a faster test for the security of the electronic device, and overcoming the limits that currently affect the detecting method for signal patterns.